export default ({ $store, app, route, redirect }) => {
  if (
    !localStorage.getItem('token') &&
    route.meta.findIndex(m => {
      return m.auth === false
    }) === -1
  ) {
    return redirect(401, '/login')
  }
}
